{% extends "base_detail.html" %}

{% load i18n %}
{% load breadcrumbs %}
{% load details %}
{% load menu %}

{% block breadcrumbs %}
    {% add_crumb 'Home' '/' %}
    {% add_crumb 'Employees' 'employee_list' %}
    {% add_crumb object %}
{% endblock %}

{% block objectactions %}
{% if perms.hr.add_employee %}
<li class="add"><a title="{% trans 'Add' %}" href="{% url employee_add %}">{% trans 'Add' %}</a></li>
{% endif %}
{% if object.pk in obj_perms.hr.change_employee %}
<li class="edit"><a title="{% trans 'Edit' %}" href="{% url employee_edit object.pk %}">{% trans 'Edit' %}</a></li>
{% endif %}
{% if object.pk in obj_perms.hr.delete_employee %}
<li class="delete"><a title="{% trans 'Delete' %}" href="{% url employee_delete object.pk %}">{% trans 'Delete' %}</a></li>
{% endif %}
{% if perms.hr.view_employee %}
<li class="all"><a title="{% trans 'All' %}" href="{% url employee_list %}">{% trans 'All' %}</a></li>
{% endif %}
{% endblock %}

{% block objectmenu %}{% menu "employee_menu" %}{% endblock %}

{% block section %}
<div class="details">
    <table class="properties">
        {% property_table object.job "[['partner', 'role']]" %}
        {% property_table object "['type', ['start', 'end']]" %}
        {% property_table object.job "['notes']" %}
    </table>
</div>
{% endblock %}
